package com.example.dto.role;

import com.baomidou.mybatisplus.annotation.TableField;
import com.example.dto.base.Base;
import com.example.dto.dept.Dept;
import com.example.dto.menu.Menu;
import com.example.dto.user.User;
import com.example.util.enums.DataScopeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import org.apache.ibatis.annotations.ResultMap;

import java.io.Serializable;
import java.util.List;
@Data
@AllArgsConstructor
public class Role extends Base implements Serializable {

    @ApiModelProperty(value = "ID", hidden = true)
    private Long  id;

    @ApiModelProperty(value = "菜单", hidden = true)
    private List<Menu> menus;

    @TableField(exist = false)
    @ApiModelProperty(value = "部门", hidden = true)
    private List<Dept> depts;

    @ApiModelProperty(value = "名称", hidden = true)
    private String name;

    @ApiModelProperty(value = "数据权限，全部 、 本级 、 自定义")
    private String dataScope = DataScopeEnum.THIS_LEVEL.getValue();

    @ApiModelProperty(value = "级别，数值越小，级别越大")
    private Integer level ;

    private String description;

    @ApiModelProperty(value = "用户", hidden = true)
    private List<User> user;

    public Role() {
    }

}
